MA

Erro Exp2.0

Por Marcelo Junior, 15 de jun. de 2019 em Scripts

18
3.4k
15 de junho de 2019 às 12:00

Adicionei helds items em uma base PDA que estou editando, foi tudo bem mais estou tendo problemas com essa parte do script que esta dando erro
 poderiam me ajudar?

erro exp.png

ZoRZ
15 de junho de 2019 às 12:03

testa

@Marcelo Junior

testa ai meu caro!

Editado Junho 17 por ZikaLord

15 de junho de 2019 às 12:32
29 minutos atrás, ZikaLord disse:

testa

-- Critical -- 
if isSummon (attacker) and isPlayer(getCreatureMaster attacker) then
local Tiers = {
[85] = {chance = Critical1},
[86] = {chance = Critical2},
[87] = {chance = Critical3},
[88] = {chance = Critical4},
[89] = {chance = Critical5},
[90] = {chance = Critical6},
[91] = {chance = Critical7},
}

local ball = getPlayerSlotItem(getCreatureMaster(attacker, 8))
local Tier = getItemAttribute(ball.uid, "heldx")
if Tier and Tier > 84 and Tier < 92 then
if math.random(1,100) <= Tiers[Tier].chance then
valor = valor * 2
doSendAnimatedText(getThingPos(cid), "STK "..(valor * 0.25), 115)
end
end
end
-- Critical --

@Marcelo Junior

testa ai meu caro!

 

Persisti no mesmo erro =/

ZoRZ
15 de junho de 2019 às 12:51
18 minutos atrás, Marcelo Junior disse:

 

Persisti no mesmo erro =/

tenta dnv, atualizei o code

15 de junho de 2019 às 13:06
15 minutos atrás, ZikaLord disse:

tenta dnv, atualizei o code

[15/06/2019 13:06:03] data/creaturescripts/scripts/exp2.0.lua:448: ')' expected near 'attacker'

 

continua mano =/

ZoRZ
15 de junho de 2019 às 13:09
Em 15/06/2019 em 13:06, Marcelo Junior disse:

[15/06/2019 13:06:03] data/creaturescripts/scripts/exp2.0.lua:448: ')' expected near 'attacker'

 

continua mano =/

atualizei novamente

agora vai @Marcelo Junior

Editado Junho 17 por ZikaLord

15 de junho de 2019 às 13:35
26 minutos atrás, ZikaLord disse:

atualizei novamente

-- Critical -- 
if isSummon (attacker) and isPlayer(getCreatureMaster attacker) then
local Tiers = {
[85] = {chance = Critical1},
[86] = {chance = Critical2},
[87] = {chance = Critical3},
[88] = {chance = Critical4},
[89] = {chance = Critical5},
[90] = {chance = Critical6},
[91] = {chance = Critical7},
}

local ball = getPlayerSlotItem(getCreatureMaster attacker, 8)
local Tier = getItemAttribute(ball.uid, "heldx")
if Tier and Tier > 84 and Tier < 92 then
if math.random(1,100) <= Tiers[Tier].chance then
valor = valor * 2
doSendAnimatedText(getThingPos(cid), "STK "..(valor * 0.25), 115)
end
end
end
-- Critical --

agora vai @Marcelo Junior


[15/06/2019 13:35:21] [Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/exp2.0.lua:448: ')' expected near 'attacker' 

 

tenso mano =/

ZoRZ
15 de junho de 2019 às 14:25
Em 15/06/2019 em 13:35, Marcelo Junior disse:


[15/06/2019 13:35:21] [Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/exp2.0.lua:448: ')' expected near 'attacker' 

 

tenso mano =/

tenta mais esse, essas funçoes são de um tfs atual, mexo mais com 0.4;0.3.6

testa mais essa vez 

Editado Junho 17 por ZikaLord

15 de junho de 2019 às 15:14
47 minutos atrás, ZikaLord disse:
-- Critical -- 
if isSummon (attacker) and isPlayer(getCreatureMaster attacker) then
local Tiers = {
[85] = {chance = Critical1},
[86] = {chance = Critical2},
[87] = {chance = Critical3},
[88] = {chance = Critical4},
[89] = {chance = Critical5},
[90] = {chance = Critical6},
[91] = {chance = Critical7},
}

local ball = getPlayerSlotItem(getCreatureMaster attacker)
local Tier = getItemAttribute(ball.uid, "heldx")
if Tier and Tier > 84 and Tier < 92 then
if math.random(1,100) <= Tiers[Tier].chance then
valor = valor * 2
doSendAnimatedText(getThingPos(cid), "STK "..(valor * 0.25), 115)
end
end
end
-- Critical --

tenta mais esse, essas funçoes são de um tfs atual, mexo mais com 0.4;0.3.6

testa mais essa vez 

Infelizmente não mano,  removi o 'attacker' da linha 1 no final e removi o 'attacker' da linha 12 e o erro parou, será que vai danifica algo?

ZoRZ
15 de junho de 2019 às 17:28
2 horas atrás, Marcelo Junior disse:

Infelizmente não mano,  removi o 'attacker' da linha 1 no final e removi o 'attacker' da linha 12 e o erro parou, será que vai danifica algo?

provavel que o script não efetue completamente

15 de junho de 2019 às 20:18
2 horas atrás, ZikaLord disse:

provavel que o script não efetue completamente

tenso, precisava muito da funcionalidade dele.

wevertonvrbW
16 de junho de 2019 às 04:25

o attacker não esta sendo reconhecido
tenta mudar para attack 
 

ZoRZ
16 de junho de 2019 às 16:16
11 horas atrás, wevertonvrb disse:

o attacker não esta sendo reconhecido
tenta mudar para attack 
 

near = perto

o erro diz que tem um ')' perto de attacker

16 de junho de 2019 às 17:32
13 horas atrás, wevertonvrb disse:

o attacker não esta sendo reconhecido
tenta mudar para attack 
 

tentei mesmo assim persisti 

ZoRZ
16 de junho de 2019 às 18:46
-- Critical -- 
if isSummon (attack) and isPlayer(getCreatureMasterAttack) then
local Tiers = {
[85] = {chance = Critical1},
[86] = {chance = Critical2},
[87] = {chance = Critical3},
[88] = {chance = Critical4},
[89] = {chance = Critical5},
[90] = {chance = Critical6},
[91] = {chance = Critical7}
}
local ball = getPlayerSlotItem(getCreatureMasterAttack, 8)
local Tier = getItemAttribute(ball.uid, "heldx")
if Tier and Tier > 84 and Tier < 92 then
if math.random(1,100) <= Tiers[Tier].chance then
valor = valor * 2
doSendAnimatedText(getThingPos(cid), "STK "..(valor * 0.25), 115)
end
end
end
-- Critical --

@Marcelo Junior

 

 

PROBLEMA RESOLVIDO COM ESSE SCRIPT!

Editado Junho 17 por ZikaLord